package io.renren.modules.vastFinance.MQ;

import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.utils.SendMsgUtils;
import io.renren.modules.vastFinance.dao.UsersDao;
import io.renren.modules.vastFinance.entity.UsersEntity;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;

@Component
//@RocketMQMessageListener(consumerGroup = "LAPTOP-T7NMFP8C", topic = "FinancialProject")
//implements RocketMQListener<String>
public class RocketMQReceiver {

//    @Resource
//    private UsersDao usersDao;
//
//    @Override
//    public void onMessage(String msg) {
//        List<UsersEntity> usersEntityList = usersDao.selectList(null);
//        for (UsersEntity usersEntity : usersEntityList) {
//            String message = "尊敬的"+usersEntity.getNickName()+"用户,今天该签到了";
//            System.err.println(message);
//            //SendMsgUtils.sendMsg(message,usersEntity.getPhone());
//        }
//    }
}
